home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 109
/
EnigmaAmiga109CD.iso
/
dalla rivista
/
amiga.free
/
sorgenti vari
/
wolfedit2 2.0.4 source.sit
/
WolfEdit2 2.0.4 Source
/
WolfMap ƒ
/
UMapGrid.p
< prev
next >
Wrap
Text File
|
1994-11-10
|
1KB
|
52 lines
unit UMapGrid;
interface
uses
HexIO, ULevel, UMapParams, UDrawing;
procedure MapGrid (level: LevelHandle;
layers: MapLayers;
vis: Rect);
implementation
procedure MapGrid (level: LevelHandle;
layers: MapLayers;
vis: Rect);
var
row, col: integer;
x, y: integer;
begin
if gridLayer in layers then begin
PenNormal;
for row := 0 to 64 do begin
y := margin + row * cellSize;
MoveTo(margin, y);
Line(64 * cellSize, 0);
MoveTo(1, y - 1);
DrawString(Hex(row, 2));
end;
for col := 0 to 64 do begin
x := margin + col * cellSize;
MoveTo(x, margin);
Line(0, 64 * cellSize);
MoveTo(x + 3, margin - fontDescent);
DrawString(Hex(col, 2));
end;
PenSize(2, 2);
for row := 0 to 64 do
if BAND(row, $3) = 0 then begin
y := margin + row * cellSize;
MoveTo(0, y);
Line(margin + 64 * cellSize, 0);
end;
for col := 0 to 64 do
if BAND(col, $3) = 0 then begin
x := margin + col * cellSize;
MoveTo(x, 0);
Line(0, margin + 64 * cellSize);
end;
end;
end;
end.